<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>  

<jsp:include page="helpers/layout_header.jsp"></jsp:include>

<%-- body --%>
<c:choose>
	<c:when test="${sessionScope.usuario.tipo eq 'ADMIN' }">
		<jsp:include page="helpers/header_admin.jsp" />
	</c:when>
	<c:otherwise>
		<jsp:include page="helpers/header_usuario.jsp" />
	</c:otherwise>
</c:choose>

<div id="div-form" class="row">
	<form:form id="form-atualizar-cadastro" class="custom" action="atualizarUsuario" method="post" modelAttribute="usuario">
		<h1>Editar Perfil</h1>
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="nomeCompleto">Nome Completo</label>
				<form:input type="text" path="nomeCompleto" value="" />
			</div>
		</div>
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="dataNascimento">Data de aniversário</label>
				<form:input type="date" path="dataNascimento" value="" />
			</div>
		</div>
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="cpf">CPF</label>
				<form:input type="text" path="cpf" value="" />
			</div>
		</div>
		
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="login">Login</label>
				<form:input type="text" path="login" value="" />
			</div>
		</div>
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="senha">Senha</label>
				<form:input type="password" id="senha" path="senha" value="" />
			</div>
		</div>
		<div class="row collapse">
			<div class="large-6 small-12 columns">
				<label for="senha">Confirme sua senha</label>
				<form:input type="password" id="senhaConfirm" path="senhaConfirm" value="" />
			</div>
		</div>
		<div class="row">
			<div class="large-6 small-6">
				<button id="bt-editar" type="submit" class="button radius right">Editar</button>
			</div>
		</div>
	</form:form>
</div>

<div class="row mensagens">
	<div data-alert="" class="alert-box secondary round processando" style="display: none;">
	  Aguarde enquanto sua requisição é processada
	</div>
	<div data-alert="" class="alert-box success round sucesso" style="display: none;">
		Sucesso.
	</div>
	<div data-alert="" class="alert-box alert round erro" style="display: none;">
	  
	</div>
</div>

<%-- /body --%>

<jsp:include page="helpers/layout_footer.jsp"></jsp:include>

<script type="text/javascript" src="resources/js/views/perfil_usuario.js" ></script>